﻿/*
* ExtendBy:xzh
* CreateDate:2012-05-21
* Description: Extjs4扩展FormPanel显示图片
* 用法：
1、直接在formPanel的Items中配置：
     {
         xtype: 'twiImageField',
         renderData: {
             url: '../resources/images/camera24x24.png'
         }
     }
2、赋值：
form.down('twiImageField').pic.dom.src = "../resources/images/camera24x24.png";
*/

Ext.define('Twi.ux.ImageField', {
    extend: 'Ext.Component',
    alias: 'widget.twiImageField',
    renderTpl: ['<img id="{id}-pic" src="{url}" alt=""/>'],
    childEls: ["pic"],
    initComponent: function () {
        this.callParent();
    }
});


